<#include "../header.ftl" />
<@head title="新闻资讯 - ${sitename}"/>
	<@nav current="新闻资讯"/>
	<div class="container">
		<div class="grid grid-4">
			<form class="search" style="width:175px;" action="${base}/search">
				<input type="hidden" name="scope" value="${scope!"news"}"/>
		  		<input name="w" class="input" placeholder="搜索资讯" value="${w!""}" />
	  			<i class="icon-search"></i>
  				<input type="submit" class="search-trigger" title="搜索" value="">
			</form>
			<div class="box">
				<div class="box-title">资讯分类</div>
			   	<div class="box-body">
			   		<div class="typo-p">
			   			<@m.widget path="/widget/news/catalog" idle=86400/>
			   		</div>
			   	</div>
			</div>
		</div>
		<div class="grid grid-16 last">
			<div class="filter">
				<span class="filter-item-cap">筛选:</span>
				<a <#if filter == "recent">class="selected tag-blue"</#if> href="${base}/news?page=${page!""}&cat=${cat!""}&filter=recent">最新资讯</a>
				<a <#if filter == "hot">class="selected tag-blue"</#if> href="${base}/news?page=${page!""}&cat=${cat!""}&filter=hot">热门资讯</a>
			</div>
			<div id="medias" class="sep">
				<#if (newsPage?exists && newsPage.result?exists && newsPage.result?size > 0)>
					<#list newsPage.result as news>
						<div class="media">
							<div class="media-body">
								<div class="media-body-title">
									<strong><a href="${base}/news/${news.id}" title="${news.title}" target="_blank">${news.title}</a></strong>
									<small class="pull-right">${news.createTime?string("yyyy-MM-dd hh:mm:ss")} 查看 ${news.views} 次</small>
								</div>
								<p class="typo-small">
									<#if news.summary?has_content>
										<@contentTransform content="${news.summary}" removeHtml=true substring=true endIndex=200 />
									<#else>
										<@contentTransform content="${news.content}" removeHtml=true substring=true endIndex=200 />
									</#if>
								</p>
							</div>
						</div>
					</#list>
					<@web.pagenavi pageEntity=newsPage baseUrl="${base}/news?page=$page$&cat=${cat!''}&filter=${filter!''}" />
				</#if>
			</div>
		</div>
	</div>
<#include "../footer.ftl" />